﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;


namespace Coda.Nth.Database
{
    public class ValuationEngineContextInitializer : DropCreateDatabaseAlways<ValuationEngineContext>
    {
        //protected override void Seed(ValuationEngineContext context)
        //{
        //    var superPortfolio = new Portfolio() { ID = 1, Name = "Super", LegalLocation = new Location() { City = "MoneyCity", Country = "GoldLAnd" } };
        //    var badPortfolio = new Portfolio() { ID = 1, Name = "bad", LegalLocation = new Location() { City = "SlumbCity", Country = "GoldLAnd" } };

        //    new List<IPrice>{
        //         new Price(){ Id = 1, Nav = 100.00M, AsOfDate = new DateTime(2012,10,1), EntryDate  = new DateTime(2012,10,15), Parent = superPortfolio},
        //         new Price(){ Id = 2, Nav = 101.00M, AsOfDate = new DateTime(2012,10,1), EntryDate  = new DateTime(2012,10,25), Parent = superPortfolio},
        //         new Price(){ Id = 3, Nav = 23.00M, AsOfDate = new DateTime(2012,10,1), EntryDate  = new DateTime(2012,10,15), Parent = badPortfolio}
        //     }.ForEach(x => context.Prices.Add(x));
        //}
        
    }
}
